package com.itheima.String;

import java.util.Scanner;

public class Testfan {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入");
        String s = sc.next();

        String s1 = "";
        for (int i = s.length()-1; i >0 ; i--) {
            char c = s.charAt(i);
            //注意字符串是常量 其值不能修改
            //当可以对变量也是对象不停的做覆盖
            //也就是不停的给它换地址
            s1 += c;
        }
        if(s.equals(s1)){
            System.out.println("是对称字符串");
        }else {
            System.out.println("不是对称字符串");
        }
    }
}
